<?php
/**
 * Created by PhpStorm.
 * User: chy
 * Date: 2017/10/12
 * Time: 下午4:16
 */?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="utf-8">
<head>
    <title>管理员信息</title>
    <meta content="text/html; charset=utf-8" http-equiv="Content-Type"/>
    <?php $this->load->helper('url');?>
    <link href="<?php echo base_url()?>css/general.css" rel="stylesheet" type="text/css" />
    <script language="javascript" type="text/javascript" src="<?php echo base_url()?>js/bootstrap.min.js"></script>
    <link href="<?php echo base_url()?>css/bootstrap.css" rel="stylesheet" type="text/css" />
    <link href="<?php echo base_url()?>css/bootstrap.min.css" rel="stylesheet" type="text/css" />
    <link href="<?php echo base_url()?>css/main.css" rel="stylesheet" type="text/css" />
    <script language="javascript" type="text/javascript" src="<?php echo base_url()?>js/jquery.js"></script>
    <script language="JavaScript"> var base_url = '<?php echo base_url()?>'; </script>
    <script language="javascript" type="text/javascript" src="<?php echo base_url()?>js/admin.js"></script>


</head>
<script>
    function validateForm(){
        if (window.confirm("是否确认提交")) {
            return true;
        }
        return false;
    }
</script>
<body  class=" x-border-layout-ct" style="position: relative;" >
<div class="container">

    <div class="row">
        <div class="col-md-8">
            <h1>Bacteria</h1>
        </div>
        <div class="col-xs-3">
            <form action="<?php echo site_url('c_data/getPost/')?>" target="_blank" method="post">
                <input class="placeholder" id="s" name="keywords" value=""  autocomplete="off">
                <input id="inputSuccess" type="hidden" name="session_user_id" value="<?php echo $_SESSION['user_id']; ?>"/>
                <input id="inputSuccess" type="hidden" name="session_user_name" value="<?php echo $_SESSION['user_name']; ?>"/>
                <input id="inputSuccess" type="hidden" name="session_role_id" value="<?php echo $_SESSION['role_id']; ?>"/>
                <input id="inputSuccess" type="hidden" name="session_logged_in" value="<?php echo $_SESSION['logged_in']; ?>"/>
        </div>
        <div class="col-xs-1">
            <input style="width: 80px;height: 30px;background: #ff8000;color: white" class="btn btn-default" type=submit name="select" value="搜索"/>
            </form>
        </div>
    </div>
</div>
<div class="container navigation">
    <div class="row" style="background-color: #ff8000;font-size: 25px">
        <div class="col-md-1">
            <form action="<?php echo site_url('c_login/manage')?>" method="post" >
                <input id="inputSuccess" type="hidden" name="session_user_id" value="<?php echo $_SESSION['user_id']; ?>"/>
                <input id="inputSuccess" type="hidden" name="session_user_name" value="<?php echo $_SESSION['user_name']; ?>"/>
                <input id="inputSuccess" type="hidden" name="session_role_id" value="<?php echo $_SESSION['role_id']; ?>"/>
                <input id="inputSuccess" type="hidden" name="session_logged_in" value="<?php echo $_SESSION['logged_in']; ?>"/>
                <input style="width: 80px;height: 30px;background: #ff8000;color: white" class="btn btn-default"  type=submit name="session_add" value="首页"/>
            </form>
        </div>
        <div class="col-md-1">
            <form action="<?php echo site_url('c_data/')?>" method="post" >
                <input id="inputSuccess" type="hidden" name="session_user_id" value="<?php echo $_SESSION['user_id']; ?>"/>
                <input id="inputSuccess" type="hidden" name="session_user_name" value="<?php echo $_SESSION['user_name']; ?>"/>
                <input id="inputSuccess" type="hidden" name="session_role_id" value="<?php echo $_SESSION['role_id']; ?>"/>
                <input id="inputSuccess" type="hidden" name="session_logged_in" value="<?php echo $_SESSION['logged_in']; ?>"/>
                <input style="width: 80px;height: 30px;background: #ff8000;color: white" class="btn btn-default" type=submit name="session_manage" value="数据"/>
            </form>
        </div>
        <div class="col-md-1">
            <form  action="<?php echo site_url('c_user_manage/')?>" method="post" >
                <input id="inputSuccess" type="hidden" name="session_user_id" value="<?php echo $_SESSION['user_id']; ?>"/>
                <input id="inputSuccess" type="hidden" name="session_user_name" value="<?php echo $_SESSION['user_name']; ?>"/>
                <input id="inputSuccess" type="hidden" name="session_role_id" value="<?php echo $_SESSION['role_id']; ?>"/>
                <input id="inputSuccess" type="hidden" name="session_logged_in" value="<?php echo $_SESSION['logged_in']; ?>"/>
                <input style="width: 80px;height: 30px;background: #ff8000;color: white" class="btn btn-default" type=submit name="session_back" value="管理员"/>
            </form>
        </div>
        <div class="col-md-1">
            <form action="<?php echo site_url('c_user_manage/update_post/'.$result['user_id'])?>" method="post" >
                <input id="inputSuccess" type="hidden" name="session_user_id" value="<?php echo $_SESSION['user_id']; ?>"/>
                <input id="inputSuccess" type="hidden" name="session_user_name" value="<?php echo $_SESSION['user_name']; ?>"/>
                <input id="inputSuccess" type="hidden" name="session_role_id" value="<?php echo $_SESSION['role_id']; ?>"/>
                <input id="inputSuccess" type="hidden" name="session_logged_in" value="<?php echo $_SESSION['logged_in']; ?>"/>
                <input style="width: 80px;height: 30px;background: #ff8000;color: white" class="btn btn-default" type=submit name="session_update" value="编辑"/>
            </form>
        </div>
        <div class="col-md-6">
            <form onsubmit="return validateForm()" action="<?php echo site_url('c_user_manage/delete/'.$result['user_id'])?>" method="post" >
                <input id="inputSuccess" type="hidden" name="session_user_id" value="<?php echo $_SESSION['user_id']; ?>"/>
                <input id="inputSuccess" type="hidden" name="session_user_name" value="<?php echo $_SESSION['user_name']; ?>"/>
                <input id="inputSuccess" type="hidden" name="session_role_id" value="<?php echo $_SESSION['role_id']; ?>"/>
                <input id="inputSuccess" type="hidden" name="session_logged_in" value="<?php echo $_SESSION['logged_in']; ?>"/>
                <input style="width: 80px;height: 30px;background: #ff8000;color: white" class="btn btn-default" type=submit name="session_dele" value="删除"/>
            </form>
        </div>
        <div class="col-xs-2">
            <a style="color: white; font-size: 14px;">
                <?php echo $_SESSION['user_id']." ".$_SESSION['user_name'];?>
            </a>
        </div>
        <div class="col-xs-2">
            <a href='<?php echo site_url('c_login/logout');?>' style="color: white; font-size: 14px;">退出登录</a>
        </div>
    </div>
</div>

<div id="main-tabs" class="container navigation" style="text-align: center" align="center">
    <!-- 菜单体 -->


                                <?//print_r($result);?>
                                <h3 style="text-align:center">管理员信息</h3>
                                <table class="table table-striped" style="width: 80%;" align="center">
                                <tbody>
                                <tr><td style="width: 150px">ID：</td><td><?php echo $result['user_id']?><br/></td></tr>
                                <tr><td>名称:</td><td><?php echo $result['user_name']?><br/></td></tr>
                                <tr><td>信息:</td><td><?echo $result['user_info'];?>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br/></td></tr>
                                <tr><td>状态：</td><td><?php if($result['user_status']==1) echo '在职'; else echo '弃用' ;?><br/></td></tr>
                                <tr><td>角色：</td><td><?php if($result['role_id']==1) echo '超级管理员'; else echo '普通管理';?><br/></td></tr>
                                <tr><td>管理数据库：</td><td><?php if($result['user_part']==0) echo '超级管理员'; else if($result['user_part']==1) echo '细菌'; else if($result['user_part']==2) echo '真菌'; else if($result['user_part']==3) echo '质粒'; else if($result['user_part']==4) echo '细胞';?><br/></td></tr>

                                <tr><td>最近登录时间:</td><td><?echo $result['lastLoginTime'];?>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br/></td></tr>
                                    <br/>
                                </tbody>
                                </table>
                                <!-- /内容 -->
    <div class="row" style="background-color: #ff8000;font-size: 25px">
        <div align="center" style=" text-align: center"><h6 align="center" style="text-align: center;color: #ff8000;">bacteria </h6></div>
    </div>
</div>

<!-- /菜单体 -->
</body>
</html>
